<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>贪吃蛇游戏</title>
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
</head>
<body>
    <div class="game-container">
        <div class="game-header">
            <div class="score-container">
                <div>分数: <span id="score">0</span></div>
                <div>最高分: <span id="highScore">0</span></div>
                <div>当前关卡: <span id="currentLevel">1</span></div>
                <div>下一关还需: <span id="nextLevelTarget">100</span>分</div>
            </div>
            <div class="game-mode">
                <label for="gameModeSelect">游戏模式:</label>
                <select id="gameModeSelect">
                    <option value="classic">经典模式</option>
                    <option value="timeAttack">限时模式</option>
                    <option value="survival">生存模式</option>
                </select>
            </div>
            <div class="difficulty">
                <label for="difficultySelect">难度:</label>
                <select id="difficultySelect">
                    <option value="easy">简单</option>
                    <option value="medium">中等</option>
                    <option value="hard">困难</option>
                </select>
            </div>
            <div class="speed-control">
                <label for="speedRange">速度:</label>
                <input type="range" id="speedRange" min="1" max="10" value="5">
                <span id="speedValue">5</span>
            </div>
        </div>
        
        <canvas id="gameCanvas" width="400" height="400"></canvas>
        
        <div class="game-controls">
            <button id="startBtn">开始游戏</button>
            <button id="restartBtn">重新开始</button>
        </div>
        
        <div class="achievements-panel">
            <h3>成就</h3>
            <div id="achievements-list">
                <div class="achievement" data-id="score100">
                    <span class="achievement-name">初级玩家</span>
                    <span class="achievement-desc">达到100分</span>
                </div>
                <div class="achievement" data-id="score500">
                    <span class="achievement-name">中级玩家</span>
                    <span class="achievement-desc">达到500分</span>
                </div>
                <div class="achievement" data-id="score1000">
                    <span class="achievement-name">高级玩家</span>
                    <span class="achievement-desc">达到1000分</span>
                </div>
                <div class="achievement" data-id="level5">
                    <span class="achievement-name">闯关专家</span>
                    <span class="achievement-desc">达到5级</span>
                </div>
            </div>
        </div>
        
        <div class="powerups-panel">
            <h3>当前状态</h3>
            <div id="active-powerups"></div>
        </div>
    </div>
    <script src="snake.js"></script>
</body>
</html>
